'use strict';

const Controller = require('egg').Controller;

class downloadController extends Controller {
    async downloadList() {
        const page = this.ctx.query.page || 1;
        var list =  await this.ctx.service.bbs.bbsListSimple(page,15,4);
        await this.ctx.render('page/download/download.html',{data:list});
    }
    async downloadContent() {
        var id = this.ctx.params.id || '';
        var detail =  await this.ctx.service.bbs.bbsDetail(id);
        await this.ctx.render('page/download/download_content.html',{arr:detail});
    }
    /*公告列表*/
    async noticeList() {
        const page = this.ctx.query.page || 1;
        var list =  await this.ctx.service.bbs.bbsListSimple(page,15,3);
        await this.ctx.render('page/notice/noticeList.html',{data:list});
    }
    /*公告详情*/
    async noticeContent() {
        var id = this.ctx.params.id || '';
        var detail =  await this.ctx.service.bbs.bbsDetail(id);
        await this.ctx.render('page/notice/notice_content.html',{arr:detail});
    }

}
module.exports = downloadController;